//
//  ListenNormalTableViewCell.m
//  ExploreWorld
//
//  Created by dlios on 15/7/13.
//  Copyright (c) 2015年 chenlin. All rights reserved.
//

#import "ListenNormalTableViewCell.h"

@implementation ListenNormalTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self buildBirmalCell];
    }
    return  self;
}



- (void)buildBirmalCell
{
    float WIDTH = self.frame.size.width;
    
    
    //标题图片
    self.cellImage = [[UIImageView alloc]initWithFrame:CGRectMake(5, 0, WIDTH , WIDTH / 2)];
    [self.cellImage setBackgroundColor:[UIColor grayColor]];
    [self addSubview:self.cellImage];
    [self.cellImage release];
    
    //title
    self.titleLable = [[UILabel alloc]initWithFrame:CGRectMake(5, WIDTH / 2 , WIDTH - 10 , 20)];
    [self addSubview:self.titleLable];
    [self.titleLable setFont:[UIFont systemFontOfSize:12]];
    UIColor *titleColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:1];
    [self.titleLable setTextColor:titleColor];
    [self.titleLable release];
    
    UIImageView *start = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 60, 60)];
    [start setCenter:CGPointMake(WIDTH / 2, (WIDTH / 2 + 20)/2)];
    [start setBackgroundColor:[UIColor blackColor]];
    [start setAlpha:0.5];
    [start setClipsToBounds:YES];
    start.layer.cornerRadius = 5;
    [start setImage:[UIImage imageNamed:@"readlyToPlay.png"]];
    [self addSubview:start];
}

@end
